package ch.zbw.timeline.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Data;

/**
 * Domain class for a holiday formula
 */
@Entity
@SequenceGenerator(name = "id_holiday_formula", initialValue = 1, allocationSize = 1)
@Table(name = "holiday_formula")
@Data
public class HolidayFormula implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id_holiday_formula", nullable = false)
	private int id;

	@Column(name = "formula", nullable = true)
	private String formula;

	@Column(name = "description", nullable = true)
	private String description;

	public HolidayFormula() {
	}

	public HolidayFormula(String formula, String description) {
		this.formula = formula;
		this.description = description;
	}
}
